<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>CSSOM - CSSStyleDeclaration - Inline Style - Instance</title>
    <link rel="author" title="Glenn Adams" href="mailto:glenn@skynav.com"/>
    <link rel="help" href="http://www.w3.org/TR/cssom/#the-cssstyledeclaration-interface"/>
    <meta name="flags" content="dom"/>
    <script src="/resources/testharness.js"/>
    <script src="/resources/testharnessreport.js"/>
  </head>
  <body>
    <div id="log"></div>
    <div id="box"></div>
    <script><![CDATA[

      var elt = document.getElementById('box');

      test(function(){

        assert_true('style' in elt);

      }, '\'style\' in elt');

      var style = elt.style;

      test(function(){

        assert_true(style instanceof CSSStyleDeclaration);

      }, 'elt.style instanceof CSSStyleDeclaration);

      test(function(){

        assert_equals(style.toString(), '[object CSSStyleDeclaration]');

      }, 'elt.style.toString() == \'[object CSSStyleDeclaration]\'');

      test(function(){

        assert_true('length' in style);

      }, '\'length\' in elt.style');

      test(function(){

        assert_equals(typeof(style.length),'number');

      }, 'typeof(elt.style.length) == \'number\'');

      test(function(){

        assert_true('cssText' in style);

      }, '\'cssText\' in elt.style');

      test(function(){

        assert_equals(typeof(style.cssText),'string');

      }, 'typeof(elt.style.cssText) == \'string\'');

      test(function(){

        assert_true('parentRule' in style);

      }, '\'parentRule\' in elt.style');

      test(function(){

        assert_true(style.parentRule === null || style.parentRule instanceof CSSRule);

      }, 'elt.style.parentRule is null or instanceof CSSRule');

    ]]>
    </script>
  </body>
</html>
